var express = require('express');
var router = express.Router();
var logger = require('../Logger').logger;//记录后台日志

router.get('/', function (req, res) {
    res.render('index', {title: 'demo'})
});

router.get('*', function (req, res) {
    res.render('error', {
        title: '404'
    })
});


//错误捕获
process.on('uncaughtException', function (err) {

    logger.info(err);

});

module.exports = router;
